package nj.yb.entity.request;

import com.alibaba.fastjson.annotation.JSONField;

/**
 * 拉取历史消息请求实体
 */
public class HistoryMsgRequest {
    @JSONField(ordinal = 1)
    private String type = RequestType.HISTORY;
    @JSONField(ordinal = 2)
    //拉取者用户名
    private String username;
    @JSONField(ordinal = 3)
    //拉取条数
    private Integer limit = 100;
    @JSONField(ordinal = 4)
    //目标用户（私聊时指定，群聊为null）
    private String targetUser;

    public String getType() {
        return type;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public Integer getLimit() {
        return limit;
    }

    public void setLimit(Integer limit) {
        this.limit = limit;
    }

    public String getTargetUser() {
        return targetUser;
    }

    public void setTargetUser(String targetUser) {
        this.targetUser = targetUser;
    }

    @Override
    public String toString() {
        return "HistoryMsgRequest{" +
                "type='" + type + '\'' +
                ", username='" + username + '\'' +
                ", limit=" + limit +
                ", targetUser='" + targetUser + '\'' +
                '}';
    }
}
